#!/usr/bin/env python
# encoding: utf-8
import datetime
import json
from loguru import logger

async def hello_world(payload,engine,context):
    payload["reply_time"] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
    params = {
	    "router":"com.xhhk.role_permissions",
        "method":"get_role_module",
        "token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiNjM1Mzc1MzA4NzQ0ODg0MjI1IiwiZXhwIjoxNjE0MTMyNDE1fQ.xqiz6p0S98DZ4rOLRNDpcimpSX4sjJ_iAkzJ9qLvpug",
        "user_id":1,
        "params": {
            "role_id":622369389438304257
            }
        }
    result = await context.worker.send(topic="com.xhhk.role_permissions",message=json.dumps(params))
    logger.info(result.body)

    return payload